package com.wxtl.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * LkCustProductId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class LkCustProductId implements java.io.Serializable {

	// Fields

	private Integer custId;
	private Integer proId;
	private String initVersion;
	private String curversion;

	// Constructors

	/** default constructor */
	public LkCustProductId() {
	}

	/** minimal constructor */
	public LkCustProductId(Integer custId, Integer proId) {
		this.custId = custId;
		this.proId = proId;
	}

	/** full constructor */
	public LkCustProductId(Integer custId, Integer proId, String initVersion,
			String curversion) {
		this.custId = custId;
		this.proId = proId;
		this.initVersion = initVersion;
		this.curversion = curversion;
	}

	// Property accessors

	@Column(name = "custId", nullable = false)
	public Integer getCustId() {
		return this.custId;
	}

	public void setCustId(Integer custId) {
		this.custId = custId;
	}

	@Column(name = "proId", nullable = false)
	public Integer getProId() {
		return this.proId;
	}

	public void setProId(Integer proId) {
		this.proId = proId;
	}

	@Column(name = "initVersion", length = 20)
	public String getInitVersion() {
		return this.initVersion;
	}

	public void setInitVersion(String initVersion) {
		this.initVersion = initVersion;
	}

	@Column(name = "curversion", length = 20)
	public String getVersion() {
		return this.curversion;
	}

	public void setVersion(String curversion) {
		this.curversion = curversion;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LkCustProductId))
			return false;
		LkCustProductId castOther = (LkCustProductId) other;

		return ((this.getCustId() == castOther.getCustId()) || (this
				.getCustId() != null && castOther.getCustId() != null && this
				.getCustId().equals(castOther.getCustId())))
				&& ((this.getProId() == castOther.getProId()) || (this
						.getProId() != null && castOther.getProId() != null && this
						.getProId().equals(castOther.getProId())))
				&& ((this.getInitVersion() == castOther.getInitVersion()) || (this
						.getInitVersion() != null
						&& castOther.getInitVersion() != null && this
						.getInitVersion().equals(castOther.getInitVersion())))
				&& ((this.getVersion() == castOther.getVersion()) || (this
						.getVersion() != null && castOther.getVersion() != null && this
						.getVersion().equals(castOther.getVersion())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCustId() == null ? 0 : this.getCustId().hashCode());
		result = 37 * result
				+ (getProId() == null ? 0 : this.getProId().hashCode());
		result = 37
				* result
				+ (getInitVersion() == null ? 0 : this.getInitVersion()
						.hashCode());
		result = 37 * result
				+ (getVersion() == null ? 0 : this.getVersion().hashCode());
		return result;
	}

}